﻿using Koala.Pro.CodeGenerator.UI.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Koala.Pro.CodeGenerator.UI.Models
{
    [Serializable]
    public class EntityProperty
    {
        private string netType;

        private string fieldName;

        private string propertyName;

        private string dbFieldName;

        private string description = string.Empty;

        private string defaultValue = string.Empty;

        private string attribute;

        private bool isPrimaryKey;

        private bool autoIncrement;

        public string NetType
        {
            get
            {
                return netType;
            }
            set
            {
                netType = value;
            }
        }

        public string FieldName
        {
            get
            {
                return fieldName;
            }
            set
            {
                fieldName = value;
            }
        }

        public string PropertyName
        {
            get
            {
                return propertyName;
            }
            set
            {
                propertyName = value;
            }
        }

        public string DbFieldName
        {
            get
            {
                return dbFieldName;
            }
            set
            {
                dbFieldName = value;
            }
        }

        public string Description
        {
            get
            {
                return description;
            }
            set
            {
                description = value;
            }
        }

        public string DefaultValue
        {
            get
            {
                return defaultValue;
            }
            set
            {
                defaultValue = value;
            }
        }

        public string Attribute
        {
            get
            {
                return attribute;
            }
            set
            {
                attribute = value;
            }
        }

        public bool IsPrimaryKey
        {
            get
            {
                return isPrimaryKey;
            }
            set
            {
                isPrimaryKey = value;
            }
        }

        public bool AutoIncrement
        {
            get
            {
                return autoIncrement;
            }
            set
            {
                autoIncrement = value;
            }
        }

        public override string ToString()
        {
            return StringUtil.ToString(this);
        }
    }
}
